import request from '@/utils/request'
const baseUrl = 'http://api.zesi.com.cn'

export function getAll(params) {
  return request({
    url: baseUrl + '/idata/gridPartition',
    method: 'get',
    params,
  })
}

export function getOne(id) {
  return request({
    url: baseUrl + '/idata/gridPartition/' + id,
    method: 'get',
  })
}

export function addOne(data) {
  return request({
    url: baseUrl + '/idata/gridPartition',
    method: 'post',
    data,
  })
}

export function updateOne(id, data) {
  return request({
    url: baseUrl + '/idata/gridPartition/' + id,
    method: 'patch',
    data,
  })
}

export function deleteOne(id) {
  return request({
    url: baseUrl + '/idata/gridPartition/' + id,
    method: 'delete',
  })
}
